Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add(FR-9): autoscaling feature UI in model service creation/modification panel #3024

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

lizable
Copy link
Contributor

@lizable lizable commented Jan 14, 2025

This PR resolves applying UI for a new key feature, "applying auto scaling rule" for each model service, which allows gradual update of the volume of model service (mostly routing(session)) according to the rule(s). PLEASE REMIND THAT it's the user matters to consider the consequences of applying the rules, for now.
In this PR, there's a new panel added in service detail page, and user can add auto scaling rule by clicking "Add Rules" on the right side of panel. After input all required in popped up modal, and click "OK" button, the rule will be applied immediately to service.

image.png

If user want to edit certain rule, then clicking the gear icon in corresponding row will do. The Rest of the rule applying mechanism would be same as creation.

image.png

When user want to delete a rule, then user just need to click the red trash bin icon next to the gear icon. After clicking the button, there's a confirmation popup modal appears, and clicking Delete button will remove the rule right away.
Screenshot 2025-02-05 at 6.51.30 PM.png

How to test

Prerequisites:

  • model-service enabled Backend.AI Core environment
  • 1. User can create auto scaling rule for each service.
  • 2. User can see auto scaling rule(s) in service detail(routing info) page.
  • 3. User can update auto scaling rule.
  • 4. User can delete auto scaling rule.

Checklist: (if applicable)

  • Mention to the original issue
  • Documentation
  • Minimum required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

@github-actions github-actions bot added the size:L 100~500 LoC label Jan 14, 2025
Copy link
Contributor Author

lizable commented Jan 14, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

github-actions bot commented Jan 14, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.69% (-0.03% 🔻)
400/8534
🔴 Branches
4.06% (-0.05% 🔻)
239/5886
🔴 Functions
2.84% (-0.04% 🔻)
78/2747
🔴 Lines
4.61% (-0.03% 🔻)
385/8351
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / AutoScalingRuleEditorModal.tsx
0% 0% 0% 0%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / InputNumberWithSlider.tsx
4.55% (-0.45% 🔻)
0% 0%
4.55% (-0.45% 🔻)

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 419be5e

@lizable lizable force-pushed the feature/model-service-autoscaling branch from 9fbef16 to a229465 Compare January 31, 2025 11:32
@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization size:XL 500~ LoC and removed size:L 100~500 LoC labels Jan 31, 2025
@lizable lizable force-pushed the feature/model-service-autoscaling branch from a229465 to 8c2825f Compare February 5, 2025 02:48
@lizable lizable marked this pull request as ready for review February 5, 2025 09:53
@lizable lizable requested review from agatha197 and yomybaby February 5, 2025 09:54
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the ESLint failure.

Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my comment and reviews.

Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't make a new rule if the name is same as the one that previously deleted.
https://github.com/user-attachments/assets/388a7640-0340-4635-9602-abbe0f3a40ba

react/src/pages/EndpointDetailPage.tsx Show resolved Hide resolved
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image.png

resources/i18n/en.json Outdated Show resolved Hide resolved
react/src/components/AutoScalingRuleEditorModal.tsx Outdated Show resolved Hide resolved
react/src/components/AutoScalingRuleEditorModal.tsx Outdated Show resolved Hide resolved
react/src/components/AutoScalingRuleEditorModal.tsx Outdated Show resolved Hide resolved
react/src/components/AutoScalingRuleEditorModal.tsx Outdated Show resolved Hide resolved
react/src/pages/EndpointDetailPage.tsx Outdated Show resolved Hide resolved
react/src/pages/EndpointDetailPage.tsx Outdated Show resolved Hide resolved
@lizable lizable changed the title add: draft for autoscaling feature UI in model service creation/modification panel Add: autoscaling feature UI in model service creation/modification panel Feb 6, 2025
@lizable lizable changed the title Add: autoscaling feature UI in model service creation/modification panel add(FR: autoscaling feature UI in model service creation/modification panel Feb 6, 2025
@lizable lizable changed the title add(FR: autoscaling feature UI in model service creation/modification panel add(FR-9): autoscaling feature UI in model service creation/modification panel Feb 6, 2025
@lizable lizable force-pushed the feature/model-service-autoscaling branch from 95da7a6 to 5fe60d0 Compare February 6, 2025 09:39
@agatha197 agatha197 force-pushed the feature/model-service-autoscaling branch 3 times, most recently from 8998bf3 to 128e942 Compare February 7, 2025 04:58
@agatha197 agatha197 force-pushed the feature/model-service-autoscaling branch from 128e942 to ee1e261 Compare February 7, 2025 05:02
@agatha197 agatha197 force-pushed the feature/model-service-autoscaling branch 2 times, most recently from 71f06f7 to 6268a28 Compare February 7, 2025 05:20
@yomybaby yomybaby force-pushed the feature/model-service-autoscaling branch 2 times, most recently from 136bf9d to 1fca264 Compare February 7, 2025 06:53
@agatha197 agatha197 force-pushed the feature/model-service-autoscaling branch from 1fca264 to eabb67e Compare February 7, 2025 07:49
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agatha197 agatha197 force-pushed the feature/model-service-autoscaling branch 2 times, most recently from 97bb040 to 38d141b Compare February 7, 2025 08:07
@yomybaby yomybaby self-requested a review February 7, 2025 08:14
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

graphite-app bot commented Feb 7, 2025

Merge activity

…ion panel (#3024)

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

This PR resolves applying UI for a new key feature, "applying auto scaling rule" for each model service, which allows gradual update of the volume of model service (mostly routing(session)) according to the rule(s). PLEASE REMIND THAT it's the user matters to consider the consequences of applying the rules, for now.
In this PR, there's a new panel added in service detail page, and user can add auto scaling rule by clicking "Add Rules" on the right side of panel. After input all required in popped up modal, and click "OK" button, the rule will be applied immediately to service.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/c0504be3-64ec-46ae-a7aa-5930b3a25f0e.png)

If user want to edit certain rule, then clicking the `gear` icon in corresponding row will do. The Rest of the rule applying mechanism would be same as creation.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/a26baac4-3a08-4b02-ab77-e01bab859ca6.png)

When user want to delete a rule, then user just need to click the red `trash bin` icon next to the `gear` icon. After clicking the button, there's a confirmation popup modal appears, and clicking `Delete` button will remove the rule right away.
![Screenshot 2025-02-05 at 6.51.30 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/Dgoz5XqHffJdivyccymr/09bc3d73-a854-4301-b586-12ffa29e5b41.png)

### How to test
> Prerequisites:
> - model-service enabled Backend.AI Core environment
- [ ] 1. User can create auto scaling rule for each service.
- [ ] 2. User can see auto scaling rule(s) in service detail(routing info) page.
- [ ] 3. User can update auto scaling rule.
- [ ] 4. User can delete auto scaling rule.

**Checklist:** (if applicable)

- [ ] Mention to the original issue
- [ ] Documentation
- [ ] Minimum required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [X] Test case(s) to demonstrate the difference of before/after
@graphite-app graphite-app bot force-pushed the feature/model-service-autoscaling branch from 9aeab1b to 419be5e Compare February 7, 2025 08:16
@graphite-app graphite-app bot merged commit 419be5e into main Feb 7, 2025
6 checks passed
@graphite-app graphite-app bot deleted the feature/model-service-autoscaling branch February 7, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:i18n Localization area:ux UI / UX issue. size:XL 500~ LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants